import file_util

str_src = file_util.read("00input.txt")
str_data = file_util.read("01input.txt")


def matrix(spl1='\n', spl2='\t'):
    arr1 = str_data.split(spl1)
    result = ''
    for item in arr1:
        arr2 = item.split(spl2)
        st = str_src.format(*arr2)
        result += st
    return result


# print(matrix())
file_util.write(matrix(), "02out.txt")
